/**
 * 用户模块的  状态层
 */

let initState = {
    userlist:[],
    total:0,
    size:1,
    page:1
}

export default function user(state = initState, action) {
    switch (action.type) {
        case "USER_SET_LIST":
            state.userlist = action.payload
            return state;
        case "USER_SET_PAGE":
            state.page = action.payload
            return state;
        case "USER_SET_SIZE":
            state.size = action.payload
        case "USER_SET_TOTAL":
            state.total = action.payload
        default:
            return state;
    }
}
